import Vue from 'vue'
import Router from 'vue-router'
import Regist from '@/views/Regist'
import Lists from '@/views/Lists'
import AddDevice from '@/views/AddDevice'
import LineChart from '@/views/LineChart'

Vue.use(Router)
const router = new Router({
  history: false,
  routes: [
    {
      path: '/',
      name: 'regist',
      meta: {
        title: 'AirKiss'
      },
      replace: true,
      component: Regist
    },
    {
      path: '/lists',
      name: 'lists',
      meta: {
        title: '设备列表'
      },
      component: Lists
    },
    {
      path: '/addDevice',
      name: 'addDevice',
      meta: {
        title: '流量计注册页'
      },
      component: AddDevice
    },
    {
      path: '/lineChart',
      name: 'lineChart',
      meta: {
        title: 'GMP详情'
      },
      component: LineChart
    }
  ]
})
// router.beforeEach((to, from, next) => {
 
// })

export default router;